jQuery(document).ready(function() {

    jQuery('.button-primary').live('click', function() {

        if (jQuery(this).attr('href') == 'javascript:') {
            return false;
        }

        var conf = confirm("Are you sure to create all thumbnails again. This may take a while?")
        if (!conf) {
            return false;
        }

        $('.all_thumbnails_again .description').css('visibility', 'visible');

        window.location.href = jQuery(this).attr('href');

        jQuery(this).attr('href', 'javascript:')

        return false;

    });


});